import React from 'react';

export interface HeaderProps<T> {
  content: T;
}

/**
 * 4.泛型
 */
class Header<T> extends React.PureComponent<HeaderProps<T>> {
  public static defaultProps = {
    content: '默认内容',
  };

  public state = {
    content: this.props.content,
  };

  public render() {
    return <div>{this.state.content}</div>;
  }
}

export default Header;
